package com.dao;

import com.mypg.CollectChapter;
import com.mypg.Question;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CollectDao {

    List<CollectChapter> selectCollectChapterByUser_id(@Param("user_id")int user_id,@Param("question_class")String question_class);
    List<Question> selectCollectQuestionByUser_id(@Param("user_id")int user_id,
                                                  @Param("question_class")String question_class,
                                                  @Param("question_chapter")String question_chapter);

    int selectCountByUser_idAndQuestion_id(@Param("user_id")int user_id,@Param("question_id")int question_id);

    int selectCountByUser_id(@Param("user_id")int user_id,@Param("question_class")String question_class,
                             @Param("question_chapter")String question_chapter);

    void collect(@Param("user_id")int user_id,@Param("question_id")int question_id);

    void cancelCollect(@Param("user_id")int user_id,@Param("question_id")int question_id);

}
